package com.bigcat.gulimall.demo.java8;

import com.bigcat.gulimall.demo.test.User;

import java.util.Optional;

/**
 * @author sufer_yuan
 * @since 2022/2/7
 */
public class optional {
    public static void main(String[] args) {
        User user = new User();
        User present = Optional.ofNullable(user).orElse(null);
        System.out.println(present);
    }
}
